<?php
defined("_VALID_ACCESS") || die('Direct access forbidden');
class Eyeworx_ContactLensInvExpManagerInstall extends ModuleInstall
{
    public function install()
    {
        try {
            $solutions_inv_recordset = new Eyeworx_ContactLensInvExpManager_RBO_ContactLensInvExps();
            $solutions_inv_recordset->install();
            $solutions_inv_recordset->add_default_access();
            $solutions_inv_recordset->set_caption('Inventory - Contact Lens Expiration List');
        } catch (Exception $e) {
            return false;
        }
        return true;
    }

    public function uninstall()
    {
        try {
            $solutions_inv_recordset = new Eyeworx_ContactLensInvExpManager_RBO_ContactLensInvExps();
            $solutions_inv_recordset->uninstall();
        } catch (Exception $e) {
            return false;
        }
        return true;
    }

    public function requires($v)
    {
        return array(
            array('name' => 'Utils/RecordBrowser', 'version' => 0)
        );
    }

    public function version()
    {
        return array('1.0');
    }

    public function simple_setup()
    {
        return array('package'=>__('Eyeworx'), 'option'=>__('Inventory - Contact Lens Expiration List'));
//        return array(
//            'package' => __('Patients Birthday List')
//        );
    }

    public function info()
    {
        return array(
            'Author' => '<a href="mailto:paulinejoygarcia@gmail.com">Pauline Joy Garcia</a>',
            'License' => 'Commercial',
            'Description' => 'Inventory - Contact Lens Expiration List'
        );
    }

}